#pragma once

#include <windows.h>


class IGameCommands;
class PhysicalObject;
class ActionObject;
class IInputProcessor;

class CInputController
{
private:
   IGameCommands& m_commandsDispatcher;
   PhysicalObject* m_controlledPhysicalObject;
   ActionObject* m_controlledActionObject;
   HWND m_hWnd;
   IInputProcessor* m_inputProcessor;

public:
   CInputController(IGameCommands& commandsDispatcher, 
                    HWND hWnd);
   ~CInputController(void);

   void processInput(float timeElapsed);

   void setProcessor(IInputProcessor& inputProcessor) {m_inputProcessor = &inputProcessor;}

   void resetProcessor() {m_inputProcessor = NULL;}

private:
   void handleApplicationEvent(UCHAR* keyBuffer);
};
